# coding: utf-8

# 导入com包下post_util.py文件中的Animal类
# from com.post_util import Animal

import com.post_util


# 导入com包下post_util.py文件中的所有
# from com.post_util import Animal

class Car:
    # 类变量/静态变量
    static_obj = "zhangsike"

    # 初始化方法
    def __init__(self, speed, name):
        # 成员变量
        self.speed = speed
        self.name = name
        # =私有变量
        self.__private_obj = "zsk"

    # 普通方法
    def say_state(self):
        print("I am going {} km".format(self.speed))

    def get_name(self):
        return self.name

    # 私有方法，前面加__
    def __private_name(self):
        print(self.name)

    def get_private(self):
        self.__private_name()
        return self.__private_obj

    # 静态方法
    @staticmethod
    def static_method():
        print("this is static method")


if __name__ == "__main__":
    print("start......")
    print(Car.static_obj)
    Car.static_method()
    car = Car("10", "zhansike")
    car.say_state()
    print(car.name)
    print(car.get_name())
    print(car.get_private())
    print("start......")
    animal = com.post_util.Animal("狗狗", "旺旺叫")
    animal.show_me()
    animal.speak()
